//
//  YFShareManager.m
//  PYQDemo
//
//  Created by Coollang on 2017/9/8.
//  Copyright © 2017年 coollang. All rights reserved.
//

#import "YFShareManager.h"
#import "MBProgressHUD+HudTools.h"

@implementation YFShareManager

+ (instancetype)shareManager {
    static YFShareManager *_shareInstacnce;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        _shareInstacnce = [YFShareManager new];
    });
    return _shareInstacnce;
}
/*
- (void)sharePlatformType:(SSDKPlatformType)type text:(NSString *)text images:(NSArray *)images {
    NSMutableDictionary *shareParams = [NSMutableDictionary dictionary];
    
    switch (type) {
        case SSDKPlatformTypeWechat:
            [shareParams SSDKSetupWeChatParamsByText:text title:@"VICTOR i" url:nil thumbImage:nil image:images musicFileURL:nil extInfo:nil fileData:nil emoticonData:nil type:SSDKContentTypeImage|SSDKContentTypeText  forPlatformSubType:type];
            break;
        case SSDKPlatformSubTypeWechatTimeline:
            [shareParams SSDKSetupWeChatParamsByText:text title:@"VICTOR i" url:nil thumbImage:nil image:images musicFileURL:nil extInfo:nil fileData:nil emoticonData:nil type:SSDKContentTypeAuto  forPlatformSubType:type];
            break;
        case SSDKPlatformSubTypeQQFriend:
            [shareParams SSDKSetupShareParamsByText:text images:images url:nil title:@"VICTOR i" type:SSDKContentTypeAuto];
            break;
        case SSDKPlatformSubTypeQZone:
            [shareParams SSDKSetupQQParamsByText:text title:@"VICTOR i" url:[NSURL URLWithString:@"www.coollang.com"] audioFlashURL:nil videoFlashURL:nil thumbImage:nil images:images type:SSDKContentTypeText|SSDKContentTypeImage forPlatformSubType:type];
            break;
        default:
            [shareParams SSDKSetupShareParamsByText:text images:images url:nil title:@"VICTOR i" type:SSDKContentTypeAuto];
            break;
    }

    [ShareSDK share:type parameters:shareParams onStateChanged:^(SSDKResponseState state, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error) {
        if (state == SSDKResponseStateSuccess) {
            [MBProgressHUD showSuccessHudInView:[UIApplication sharedApplication].keyWindow message:NSLocalizedString(@"Share Successfully", "") afterDelay:1.5];
        }
    }];
}
*/


@end
